import request from '@/utils/request'

// 新增小休状态
export function fetchAdd(data) { 
  return request({
    url: '/agent/away/save',
    method: 'post',
    data
  })
}

// 删除小休状态
export function fetchDel(data) { 
  return request({
    url: '/agent/away/remove',
    method: 'post',
    data
  })
}

// 禁止小休信息
export function fetchDisabled(data) { 
  return request({
    url: '/agent/away/disable',
    method: 'post',
    data
  })
}

// 下载模板
export function downloadUserInfo(data) { 
  return request({
    url: '/videoPool/downloadTemplate',
    method: 'get',
    params: data,
    responseType: "blob"
  })
}

// 小休列表
export function fetchList(data) { 
  return request({
    url: '/agent/away/list',
    method: 'get',
    params: data
  })
}

// 小休信息详情
export function fetchDetail(data) { 
  return request({
    url: '/agent/away/getOne',
    method: 'get',
    params: data
  })
}